﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3
{
    internal class Driver
    {
        //runnable其实是一个对象，？对编译器保证后面使用的时候会初始化对象的
        public IRunnable? runnable = null;
        public Driver() { }
        public Driver(IRunnable runnable)
        {
            this.runnable = runnable;
        }

        public void Drive()
        {
            runnable?.Run();
        }
    }
}
